package demo3;

import java.util.Arrays;

public class test {

    public static void main(String[] args) {

        Person[] persons=new Person[3];
        persons[0]=new Person("zhangsan",12,57.4);
        persons[1]=new Person("lisi",14,80.7);
        persons[2]=new Person("wangwu",13,70.5);


        agecompartor agecom=new agecompartor();
        Arrays.sort(persons,agecom);
        System.out.println(Arrays.toString(persons));

    }


}
